const db = require("../../../db");
const { SYSTEM_ERROR, NULL_ERROR } = require("../../../utils/errorCode");
exports.main = (req, res) => {

    const { addressId } = req.body;
    if (!addressId) {
        return res.err(NULL_ERROR);
    }
    const sql = `update address set isDelete = 1 where addressId = ?`
    db.query(sql, addressId, (err, result) => {
        if (err) {
            console.log(err);
            return res.err(SYSTEM_ERROR);
        }
        return res.sm("删除成功")
    })

}

